package org.jeecg.modules.gift.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 活动
 * @Author: jeecg-boot
 * @Date:   2024-07-11
 * @Version: V1.0
 */
@Data
@TableName("gift_activity")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="gift_activity对象", description="活动")
public class GiftActivityDetail extends GiftActivity {

    @ApiModelProperty(value = "当前用户状态 0-未参加 1-未领卡片 2-进行中 3-任务完 4-活动结束")
    private Integer userStatus;


    public static GiftActivityDetail create(GiftActivity info) {
        GiftActivityDetail activityDetail = new GiftActivityDetail();
        activityDetail.setId(info.getId());
        activityDetail.setActivityName(info.getActivityName());
        activityDetail.setActivityImage(info.getActivityImage());
        activityDetail.setMail(info.getMail());
        activityDetail.setStartTime(info.getStartTime());
        activityDetail.setEndTime(info.getEndTime());
        activityDetail.setActivityContent(info.getActivityContent());
        activityDetail.setActivityStatus(info.getActivityStatus());
        return activityDetail;
    }
}
